//本地缓存的位置
function setLocalLocation(){
	var uAddress = localStorage['uAddress'];
//    var uAddress = "ddd&loc=陕西省西安市莲湖区";
	if (uAddress != undefined) {
		var uAddressArr = uAddress.split("loc=");
		
        uAddress = decodeURIComponent(uAddressArr[1]);
		if(uAddress.indexOf("省")>0)
		{
			uAddressArr = uAddress.split("省");
            uAddress = uAddressArr[1];
			uAddressArr = uAddress.split("市");
            uAddress = uAddressArr[0];
		}
		else
		{
			 uAddressArr = uAddress.split("市");
           	 uAddress = uAddressArr[0];
		}
        if (uAddress == undefined || uAddress == "" || uAddress == null) {
        	uAddress = "上海";
        }
	     loadInfo(uAddress);
	}
    else {	
        $$("qifei").innerHTML = "上海虹桥";
		$$("qifei1").innerHTML =  "SHA";
    }
}
//加载城市信息
function loadInfo(city) {
		var path = "jgp/res/citys.png";//保存城市列表信息的文件路径
		var cityName1='';
		var cityCode1='';
    $.getJSON(path, function(data) {
        $.each(data.citys, function(i, item) {
			var cityName=item.name;
			var cityCode = item.code;
			if(cityName.indexOf(city) >= 0 ) {
				if(cityCode=="PVG"){
					cityName='SHA 上海虹桥';
					cityCode='SHA';
				}
				cityName1=cityName.substring(4,cityName.length);
				city1=cityCode;
			}
        });
		if(city==null||city==""){
			city1 = "默认SHA";
		}
				
		$$("qifei").innerHTML = cityName1;
		$$("qifei1").innerHTML = city1;
        });
}

